package com.qingluan.arguments;

import java.io.File;

import android.R.string;
import android.os.Environment;
import android.widget.Toast;

public class ARGUMENTS {
	/*
	 * 
	 * web arguments
	 */
	public static final String ROOT_URL ="http://114.215.190.155:8888/";
	public static final String WS_URL = "ws://114.215.190.155:8888/";
	//public static final String ROOT_URL = "http://192.168.0.148:8888/";
	
	//post key 
	public static final String POST_ARGUMENT_INDEX = "JSON_NEW_ITEM";
	public static final String POST_ARGUMENT_PICTURE = "JSON_PICTURE_GET";
	public static final String POST_ARGUMETN_CREATE_ITEM ="JSON_ITEM_CREATE";
	public static final String UP_MISSION_IMAGE ="JSON_IMAGE";
	public static final String POST_RECEIVE = "JSON_RECEIVE_ITEM";
	public static final String POST_ARCHIVE = "JSON_ARCHIVE_ITEM";
	public static final String POST_GET_TALK = "JSON_ITEM_TALK";
	public static final String POST_PULL_TALKING = "JSON_ITEM_GET_TALK";
	//ips
	public static final String INDEX_IP = ROOT_URL + "item/get_new_item";
	public static final String PICTURE_IP = ROOT_URL + "item/get_mission_picture";
	public static final String CREATE_IP = ROOT_URL + "item/post_item";
	public static final String UP_MISSION_IMAGE_IP = ROOT_URL + "item/picture";
	public static final String RECEIVE_IP = ROOT_URL + "item/receive";
	public static final String REMOVE_MISSION_IP = ROOT_URL + "item/delete";
	public static final String ARCHIVE_MISSION_IP = ROOT_URL + "item/archive";
	public static final String GET_TALK_IP = ROOT_URL + "item/talk_in_item";
	public static final String PULL_TALKING_IP = ROOT_URL + "item/get_talk_in_item";
	public static final String GET_OWN_PERSON_INFO_IP = ROOT_URL+"look_my_profile";
	public static final String CHANGE_PROFILE_IP = ROOT_URL +"change_profile";
	public static final String POINT_GET_IP = ROOT_URL + "item/get_item_in_map";
	
	
	//ws 
	public static final String PUSH_INFO_IP = WS_URL + "talk_web_socket";
	public static final String GEO_LOCATION_IP = WS_URL + "position_web_socket";
	//post argu area
	public static final String POST_PICTURE = "MY_IMAGE";
	public static final String POST_MY_INFO = "MY_INFO";
	public static final String POST_NAME = "MY_NAME";
	public static final String POST_TAG = "MY_TAG";
	public static final String REMOVE_MISSION = "JSON_DELETE_ITEM";
	public static final String GET_OWN_PERSON_INFO = "JSON_LOOK_MY_PROFILE";
	public static final String POST_CHANGE_PROFILE = "JSON_CHANGE_PROFILE";
	public static final String POST_POINT_GET = "JSON_POINT_GET";
	//Service register
	public static final String PUSH_SERVICE_NAME = "com.qingluan.action.push";
	public static final String SEND_INFO_TO_SERVICE = "com.qingluan.action.sendInfo";
	public static final String REMOVE_ONE_MISSION_SERVICE = "com.qingluan.action.removeOneMission";
	public static final String REMOVE_ONE_TO_SERVICE = "com.qingluan.action.toservice";
	public static final String GEO_LOCATION_SERVICE_PUSH = "com.qingluan.action.location.getpartner.push";
	public static final String GEO_LOCATION_SERVICE_RECE = "com.qingluan.action.location.getpartner.receive";
			
	public static final int ChoosePhotoCode =1 ;
	public static final int TakephotoCode = 3;
	public static final int AddTag = 4;
	public static final int DetailInfoFactory_TAG = 2;
	public static final int Choose_place = 5;
	
	
	
	public static String getPicturePath(){
		String uri = Environment.getExternalStoragePublicDirectory("Do").getPath()+"/Do_picture";
		boolean result = true;
		if (! new File(uri ).exists()){
			result =  new File(uri).mkdir();
		}
		
		if (result ){
			return uri;
		}else {
			return null;
		}
	}
	
}
